import request from '@/config/axios'

// 负面期刊库 VO
export interface NegativeJournalsVO {
  id: string // 主键
  name: string // 期刊名
  issn: string // ISSN
  eissn: string // EISSN
  year: string // 年度
}

// 负面期刊库 API
export const NegativeJournalsApi = {
  // 查询负面期刊库分页
  getNegativeJournalsPage: async (params: any) => {
    return await request.get({ url: `/core/negative-journals/page`, params })
  },

  // 查询负面期刊库详情
  getNegativeJournals: async (id: number) => {
    return await request.get({ url: `/core/negative-journals/get?id=` + id })
  },

  // 新增负面期刊库
  createNegativeJournals: async (data: NegativeJournalsVO) => {
    return await request.post({ url: `/core/negative-journals/create`, data })
  },

  // 修改负面期刊库
  updateNegativeJournals: async (data: NegativeJournalsVO) => {
    return await request.put({ url: `/core/negative-journals/update`, data })
  },

  // 删除负面期刊库
  deleteNegativeJournals: async (id: number) => {
    return await request.delete({ url: `/core/negative-journals/delete?id=` + id })
  },

  // 导出负面期刊库 Excel
  exportNegativeJournals: async (params) => {
    return await request.download({ url: `/core/negative-journals/export-excel`, params })
  }
}
